<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta charset="utf-8" />
    <title>后台管理 - 平台管理</title>

    <meta name="keywords" content="{$Think.CONFIG.keywords}" />
    <meta name="description" content="{$Think.CONFIG.description}" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />

    <include file="Public/head" />
</head>
<?php $Platform='active';$ptitle='平台管理';$title='列表';?>
<body class="no-skin">
<include file="Public/header" />
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try{ace.settings.check('main-container' , 'fixed')}catch(e){}
    </script>

    <include file="Public/sidebar" />
    <div class="main-content">
        <div class="main-content-inner">
            <!-- #section:basics/content.breadcrumbs -->
            <include file="Public/breadcrumbs" />

            <!-- /section:basics/content.breadcrumbs -->
            <div class="page-content">
                <include file="Public/set" />

                <!-- /section:settings.box -->
                <div class="row">
                    <div class="col-xs-12" style="width:80%;">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <form id="form" method="post" action="{:U('del')}">
                                <table class="table table-striped table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th width="10%">网站LOGO</th>
                                        <th>标题</th>
                                        <th>关键字</th>
                                        <th>描述</th>
                                        <th>版权</th>
                                        <th>备案号</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <style>
                                        .grouptd{position:relative;}
                                        .group{display:inline-block;width:100%;}
                                        .groupselect{position:absolute;top:0;left:0;width:100%;height:100%;border:0;}
                                    </style>
                                    <tr>
                                        <td><img src="__ROOT__{$platform_set['logo']}" width="50%" ></td>
                                        <td>{$platform_set['title']}</td>
                                        <td>{$platform_set['keywords']}</td>
                                        <td>{$platform_set['description']}</td>
                                        <td>{$platform_set['copyright']}</td>
                                        <td>{$platform_set['record']}</td>
                                        <td>
                                            <div class="hidden-sm hidden-xs action-buttons">
                                                <a class="green" href="{:U('platform_set_edit')}" title="修改">
                                                    <i class="ace-icon fa fa-pencil bigger-130"></i>
                                                </a>
                                            </div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </form>
                        </div>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <include file="Public/footer" />

</div><!-- /.main-container -->

<include file="Public/footerjs" />
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(function(){
        $(".group").click(function(){
            $(this).addClass('hide');
            $(this).parent().find(".groupselect").removeClass('hide');
        })
        $(".groupselect").on("change",function(){
            var ob = $(this);
            var gid=ob.val();
            var uid = ob.parent().find('.group').attr('val');
            $.get("{:U('update')}?ajax=yes&uid="+uid+"&gid="+gid,function(data){
                var text = ob.find("option:selected").text();
                ob.parent().find(".group").removeClass('hide').html(text);
                ob.addClass('hide');
            });
        })

        $(".check-all").click(function(){
            $(".uids").prop("checked", this.checked);
        });
        $(".uids").click(function(){
            var option = $(".ids");
            option.each(function(i){
                if(!this.checked){
                    $(".check-all").prop("checked", false);
                    return false;
                }else{
                    $(".check-all").prop("checked", true);
                }
            });
        });
        $("#submit").click(function(){
            bootbox.confirm({
                title: "系统提示",
                message: "是否要删除所选用户？",
                callback:function(result){
                    if(result){
                        $("#form").submit();
                    }
                },
                buttons: {
                    "cancel" : {"label" : "取消"},
                    "confirm" : {
                        "label" : "确定",
                        "className" : "btn-danger"
                    }
                }
            });
        });
        $(".del").click(function(){
            var url = $(this).attr('val');
            bootbox.confirm({
                title: "系统提示",
                message: "是否要该用户?",
                callback:function(result){
                    if(result){
                        window.location.href = url;
                    }
                },
                buttons: {
                    "cancel" : {"label" : "取消"},
                    "confirm" : {
                        "label" : "确定",
                        "className" : "btn-danger"
                    }
                }
            });
        });
    })
</script>
</body>
</html>
